﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="AsyncFileUpload.ascx.cs" Inherits="AsyncFileUpload" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<%--<ajaxToolkit:ToolkitScriptManager runat="Server" EnablePartialRendering="true" ID="ScriptManager1"/>--%>

<ajaxToolkit:AsyncFileUpload ID="AsyncFileUpload1" runat="server" OnUploadedComplete="AsyncFileUploadComplete"
        UploaderStyle="Traditional" ThrobberID="myThrobber" />
    <div>
        <asp:UpdatePanel UpdateMode="Conditional" ID="Update1" runat="server">
            <Triggers>
            <asp:AsyncPostBackTrigger ControlID="AsyncFileUpload1" EventName="UploadedComplete" />               
                    
            </Triggers>
            <ContentTemplate>       
                <asp:Image ID="imgDisplay" runat="server" ImageUrl="~/content/images/default-image.gif" />
            </ContentTemplate>
        </asp:UpdatePanel>
        <asp:Button ID="btn1" runat="server" Text="Upload image" />
    </div>
    
